package com.atgm.mall.gmmailproduct.service.impl;

import com.atgm.mall.gmmailproduct.dao.BannerDao;
import com.atgm.mall.gmmailproduct.entity.BannerEntity;
import com.atgm.mall.gmmailproduct.service.BannerService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BannerServiceImpl extends ServiceImpl<BannerDao, BannerEntity> implements BannerService {

    @Override
    public List<BannerEntity> getBannerList() {
        QueryWrapper<BannerEntity> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("is_show", 1);
        List<BannerEntity> list = baseMapper.selectList(queryWrapper);
        return list;
    }
}
